import sys

matched = 0
total = 0
for l in sys.stdin:
    l = l.strip()
    p = l.split()
    actual = float(p[2])
    predicted = float(p[3])
    total += 1
    if actual == predicted:
        matched += 1

print float(matched) / float(total)
